<?php
/*
*工作日接口类
*/
class workDayAppClass extends appBase{
	/*根据月份获取工作日*/
	public function home(){
		$workDay = query("workDay","moon = '".$this->post['moon']."'");
		if(!$this->power("workDay","see")){
			$json['warn'] = "您没有查看工作日的权限";
		}elseif(empty($this->post['moon'])){
			$json['warn'] = "月份为空";
		}elseif(preg_match(checkYm,$this->post['moon']) == 0){
			$json['warn'] = "月份格式不对";
		}elseif(empty($workDay['id'])){
			$json['warn'] = "未找到此月份";
		}else{
			$json['moon'] = $workDay['moon'];//月份
			$json['day'] = $workDay['workDay'];//工作日数组
			$json['text'] = $workDay['text'];//备注
			$json['warn'] = "success";
		}
		//返回
		return $json;
	}
}